home *** CD-ROM | disk | FTP | other *** search
/ PC for Alla 2005 May / PC för Alla 0505.iso / fullversioner / realsoft3d / data1.cab / Scripting / scripts / js / real / code / r3vcam.js < prev    next >
Encoding:
JavaScript  |  2005-04-04  |  12.4 KB  |  442 lines

  1.  
  2. // JavaScript wrapper for r3vcam.h
  3. // Auto generated file, do not modify by hand
  4. // Copyright ⌐ 2004, Realsoft Graphics Oy
  5.  
  6. var R3_VIEWCAM_H = 1;
  7. include("oops/r3model.js")
  8. include("oops/r3coords.js")
  9. include("oops/r3matrix.js")
  10. include("oops/r3gfx.js")
  11.  
  12.  
  13. var R3CLID_VCAM = 71;
  14.  
  15.  
  16.  
  17.  
  18. // Description: Sets the current orientation of camera as the native orientation
  19.  
  20. R3VCM_SETNATIVEORIENTATION = 71005;
  21.  
  22. function mR3VCM_SETNATIVEORIENTATION() {
  23.   DoA(this.r3obj, 71005, 0, R3TID_INTEGER, 0);
  24. }
  25.  
  26. // Description: resets the camera to its native orientation
  27.  
  28. R3VCM_GOTONATIVEORIENTATION = 71006;
  29.  
  30. function mR3VCM_GOTONATIVEORIENTATION() {
  31.   DoA(this.r3obj, 71006, 0, R3TID_INTEGER, 0);
  32. }
  33.  
  34. // Description: rotates camera in its native orientation
  35. // p1: Number, amount of horiz. rotation in radians
  36. // p2: Number, amount of vert. rotation in radians
  37. // p3: Integer, rotate flags as defined below, defines what to rotate 
  38.  
  39. R3VCM_ROTATE = 71007;
  40.  
  41. function mR3VCM_ROTATE(p1, p2, p3) {
  42.   DoA3(this.r3obj, 71007, p1, R3TID_FLOAT, 0, p2, R3TID_FLOAT, 0, p3, R3TID_INTEGER, 0);
  43. }
  44.  
  45. // Description: sets the hotpoint to a common value
  46. // p3: r3Vect, the new hot point position    
  47.  
  48. R3VCCM_SETALLHOTPOINTS = 71008;
  49.  
  50. function mR3VCCM_SETALLHOTPOINTS(p3) {
  51.   DoA(this.r3obj, 71008, p3, R3TID_VECTOR, 0);
  52. }
  53.  
  54. // Description: maps a 2d sceen coordinate to a point on orthogonal plane at unit distance
  55. //      from the camera
  56.  
  57. R3VCM_DO2DTODIRPOINT = 71009;
  58.  
  59. function mR3VCM_DO2DTODIRPOINT() {
  60.   DoA(this.r3obj, 71009, 0, R3TID_INTEGER, 0);
  61. }
  62.  
  63. // Description: projects a point to the screen coords. Positive t coord indicates if it was
  64. //      in front of the camera.
  65.  
  66. R3VCM_DO3DTO2DANDSIGN = 71010;
  67.  
  68. function mR3VCM_DO3DTO2DANDSIGN() {
  69.   DoA(this.r3obj, 71010, 0, R3TID_INTEGER, 0);
  70. }
  71.  
  72. // Description: finds the screen coords of the point where the given line goes through minclipdist
  73. //      plane
  74. // p3: r3Vect, result vector. p3->r & s will contain the screen coords.    
  75.  
  76. R3VCM_CLIPLINE = 71012;
  77.  
  78. function mR3VCM_CLIPLINE(p3) {
  79.   DoA(this.r3obj, 71012, p3, R3TID_VECTOR, 0);
  80. }
  81.  
  82. // Description: maps a 2d screen coordinate (on floating point form) to input plane
  83.  
  84. R3VCM_DO2DFLOATTO3D = 71013;
  85.  
  86. function mR3VCM_DO2DFLOATTO3D() {
  87.   DoA(this.r3obj, 71013, 0, R3TID_INTEGER, 0);
  88. }
  89.  
  90. // Description: Rotates from current view to closest main native projection axis direction
  91. // p1: Integer, rotate flags
  92. // p3: Integer, see rotate directions below 
  93.  
  94. R3VCM_ROTATETOMAIN = 71014;
  95.  
  96. function mR3VCM_ROTATETOMAIN(p1, p3) {
  97.   DoA2(this.r3obj, 71014, p1, R3TID_INTEGER, 0, p3, R3TID_INTEGER, 0);
  98. }
  99.  
  100. // Description: finds the screen coords of the point where the given line goes through maxclipdist
  101. //      plane
  102. // p3: r3Vect, result vector. p3->r & s will contain the screen coords.    
  103.  
  104. R3VCM_CLIPFARLINE = 71015;
  105.  
  106. function mR3VCM_CLIPFARLINE(p3) {
  107.   DoA(this.r3obj, 71015, p3, R3TID_VECTOR, 0);
  108. }
  109.  
  110. // Description: finds the screen coords of the point where the given line goes through a
  111. //      clip plane
  112.  
  113. R3VCM_CLIPLINEGENERAL = 71016;
  114.  
  115. function mR3VCM_CLIPLINEGENERAL() {
  116.   DoA(this.r3obj, 71016, 0, R3TID_INTEGER, 0);
  117. }
  118.  
  119. var R3VCAM_ROTATEUP = 0;
  120. var R3VCAM_ROTATEDOWN = 1;
  121. var R3VCAM_ROTATELEFT = 2;
  122. var R3VCAM_ROTATERIGHT = 3;
  123. var R3VCROTATE_CAMERA = 1;
  124. var R3VCROTATE_IPLANE = 2;
  125. var R3VCROTATE_BANK = 4;
  126. var R3VCROTATE_ABOUTVP = 8;
  127.  
  128.  
  129.  
  130. R3VCA_Projection = 71501;
  131. function SetR3VCA_Projection(value) {
  132.   R3Set(this.r3obj, R3VCA_Projection, value, R3TID_INTEGER, 0); 
  133. }
  134.  
  135. function GetR3VCA_Projection() {
  136.   return R3Get(this.r3obj, R3VCA_Projection, R3TID_INTEGER, 0); 
  137. }
  138.  
  139. R3VCA_Width = 71502;
  140. function SetR3VCA_Width(value) {
  141.   R3Set(this.r3obj, R3VCA_Width, value, R3TID_INTEGER, 0); 
  142. }
  143.  
  144. function GetR3VCA_Width() {
  145.   return R3Get(this.r3obj, R3VCA_Width, R3TID_INTEGER, 0); 
  146. }
  147.  
  148. R3VCA_Height = 71503;
  149. function SetR3VCA_Height(value) {
  150.   R3Set(this.r3obj, R3VCA_Height, value, R3TID_INTEGER, 0); 
  151. }
  152.  
  153. function GetR3VCA_Height() {
  154.   return R3Get(this.r3obj, R3VCA_Height, R3TID_INTEGER, 0); 
  155. }
  156.  
  157. R3VCA_AspectRatio = 71504;
  158. function SetR3VCA_AspectRatio(value) {
  159.   R3Set(this.r3obj, R3VCA_AspectRatio, value, R3TID_FLOAT, 0); 
  160. }
  161.  
  162. function GetR3VCA_AspectRatio() {
  163.   return R3Get(this.r3obj, R3VCA_AspectRatio, R3TID_FLOAT, 0); 
  164. }
  165.  
  166. R3VCA_Position = 71505;
  167. function SetR3VCA_Position(value) {
  168.   R3Set(this.r3obj, R3VCA_Position, value, R3TID_VECTOR, 0); 
  169. }
  170.  
  171. function GetR3VCA_Position() {
  172.   return R3Get(this.r3obj, R3VCA_Position, R3TID_VECTOR, 0); 
  173. }
  174.  
  175. R3VCA_Aimpoint = 71506;
  176. function SetR3VCA_Aimpoint(value) {
  177.   R3Set(this.r3obj, R3VCA_Aimpoint, value, R3TID_VECTOR, 0); 
  178. }
  179.  
  180. function GetR3VCA_Aimpoint() {
  181.   return R3Get(this.r3obj, R3VCA_Aimpoint, R3TID_VECTOR, 0); 
  182. }
  183.  
  184. R3VCA_Heading = 71507;
  185. function SetR3VCA_Heading(value) {
  186.   R3Set(this.r3obj, R3VCA_Heading, value, R3TID_FLOAT, 0); 
  187. }
  188.  
  189. function GetR3VCA_Heading() {
  190.   return R3Get(this.r3obj, R3VCA_Heading, R3TID_FLOAT, 0); 
  191. }
  192.  
  193. R3VCA_Pitching = 71508;
  194. function SetR3VCA_Pitching(value) {
  195.   R3Set(this.r3obj, R3VCA_Pitching, value, R3TID_FLOAT, 0); 
  196. }
  197.  
  198. function GetR3VCA_Pitching() {
  199.   return R3Get(this.r3obj, R3VCA_Pitching, R3TID_FLOAT, 0); 
  200. }
  201.  
  202. R3VCA_Banking = 71509;
  203. function SetR3VCA_Banking(value) {
  204.   R3Set(this.r3obj, R3VCA_Banking, value, R3TID_FLOAT, 0); 
  205. }
  206.  
  207. function GetR3VCA_Banking() {
  208.   return R3Get(this.r3obj, R3VCA_Banking, R3TID_FLOAT, 0); 
  209. }
  210.  
  211. R3VCA_IPlaneHeading = 71510;
  212. function SetR3VCA_IPlaneHeading(value) {
  213.   R3Set(this.r3obj, R3VCA_IPlaneHeading, value, R3TID_FLOAT, 0); 
  214. }
  215.  
  216. function GetR3VCA_IPlaneHeading() {
  217.   return R3Get(this.r3obj, R3VCA_IPlaneHeading, R3TID_FLOAT, 0); 
  218. }
  219.  
  220. R3VCA_IPlanePitching = 71511;
  221. function SetR3VCA_IPlanePitching(value) {
  222.   R3Set(this.r3obj, R3VCA_IPlanePitching, value, R3TID_FLOAT, 0); 
  223. }
  224.  
  225. function GetR3VCA_IPlanePitching() {
  226.   return R3Get(this.r3obj, R3VCA_IPlanePitching, R3TID_FLOAT, 0); 
  227. }
  228.  
  229. R3VCA_IPlaneBanking = 71512;
  230. function SetR3VCA_IPlaneBanking(value) {
  231.   R3Set(this.r3obj, R3VCA_IPlaneBanking, value, R3TID_FLOAT, 0); 
  232. }
  233.  
  234. function GetR3VCA_IPlaneBanking() {
  235.   return R3Get(this.r3obj, R3VCA_IPlaneBanking, R3TID_FLOAT, 0); 
  236. }
  237.  
  238. R3VCA_Scale = 71513;
  239. function SetR3VCA_Scale(value) {
  240.   R3Set(this.r3obj, R3VCA_Scale, value, R3TID_FLOAT, 0); 
  241. }
  242.  
  243. function GetR3VCA_Scale() {
  244.   return R3Get(this.r3obj, R3VCA_Scale, R3TID_FLOAT, 0); 
  245. }
  246.  
  247. R3VCA_CoordSys = 71514;
  248. function SetR3VCA_CoordSys(value) {
  249.   R3Set(this.r3obj, R3VCA_CoordSys, value, R3TID_COORDSYS, 0); 
  250. }
  251.  
  252. function GetR3VCA_CoordSys() {
  253.   return R3Get(this.r3obj, R3VCA_CoordSys, R3TID_COORDSYS, 0); 
  254. }
  255.  
  256. R3VCA_IPCoordSys = 71515;
  257. function SetR3VCA_IPCoordSys(value) {
  258.   R3Set(this.r3obj, R3VCA_IPCoordSys, value, R3TID_COORDSYS, 0); 
  259. }
  260.  
  261. function GetR3VCA_IPCoordSys() {
  262.   return R3Get(this.r3obj, R3VCA_IPCoordSys, R3TID_COORDSYS, 0); 
  263. }
  264.  
  265. R3VCA_Distance = 71516;
  266. function SetR3VCA_Distance(value) {
  267.   R3Set(this.r3obj, R3VCA_Distance, value, R3TID_FLOAT, 0); 
  268. }
  269.  
  270. function GetR3VCA_Distance() {
  271.   return R3Get(this.r3obj, R3VCA_Distance, R3TID_FLOAT, 0); 
  272. }
  273.  
  274. R3VCA_Hotpoint = 71517;
  275. function SetR3VCA_Hotpoint(value) {
  276.   R3Set(this.r3obj, R3VCA_Hotpoint, value, R3TID_VECTOR, 0); 
  277. }
  278.  
  279. function GetR3VCA_Hotpoint() {
  280.   return R3Get(this.r3obj, R3VCA_Hotpoint, R3TID_VECTOR, 0); 
  281. }
  282.  
  283. R3VCA_ModelView = 71518;
  284. function GetR3VCA_ModelView() {
  285.   return R3Get(this.r3obj, R3VCA_ModelView, R3TID_MATRIX, 0); 
  286. }
  287.  
  288. R3VCA_ViewIPAngle = 71519;
  289. function GetR3VCA_ViewIPAngle() {
  290.   return R3Get(this.r3obj, R3VCA_ViewIPAngle, R3TID_FLOAT, 0); 
  291. }
  292.  
  293. R3VCA_KeepIPlaneOrthogonal = 71520;
  294. function SetR3VCA_KeepIPlaneOrthogonal(value) {
  295.   R3Set(this.r3obj, R3VCA_KeepIPlaneOrthogonal, value, R3TID_INTEGER, 0); 
  296. }
  297.  
  298. function GetR3VCA_KeepIPlaneOrthogonal() {
  299.   return R3Get(this.r3obj, R3VCA_KeepIPlaneOrthogonal, R3TID_INTEGER, 0); 
  300. }
  301.  
  302. R3VCA_RelHeading = 71522;
  303. function SetR3VCA_RelHeading(value) {
  304.   R3Set(this.r3obj, R3VCA_RelHeading, value, R3TID_FLOAT, 0); 
  305. }
  306.  
  307. R3VCA_RelIPlaneHeading = 71525;
  308. function SetR3VCA_RelIPlaneHeading(value) {
  309.   R3Set(this.r3obj, R3VCA_RelIPlaneHeading, value, R3TID_FLOAT, 0); 
  310. }
  311.  
  312. R3VCA_NativeCoordSys = 71528;
  313. function SetR3VCA_NativeCoordSys(value) {
  314.   R3Set(this.r3obj, R3VCA_NativeCoordSys, value, R3TID_COORDSYS, 0); 
  315. }
  316.  
  317. function GetR3VCA_NativeCoordSys() {
  318.   return R3Get(this.r3obj, R3VCA_NativeCoordSys, R3TID_COORDSYS, 0); 
  319. }
  320.  
  321. R3VCA_MinClipDist = 71529;
  322. function SetR3VCA_MinClipDist(value) {
  323.   R3Set(this.r3obj, R3VCA_MinClipDist, value, R3TID_FLOAT, 0); 
  324. }
  325.  
  326. function GetR3VCA_MinClipDist() {
  327.   return R3Get(this.r3obj, R3VCA_MinClipDist, R3TID_FLOAT, 0); 
  328. }
  329.  
  330. R3VCA_MaxClipDist = 71530;
  331. function SetR3VCA_MaxClipDist(value) {
  332.   R3Set(this.r3obj, R3VCA_MaxClipDist, value, R3TID_FLOAT, 0); 
  333. }
  334.  
  335. function GetR3VCA_MaxClipDist() {
  336.   return R3Get(this.r3obj, R3VCA_MaxClipDist, R3TID_FLOAT, 0); 
  337. }
  338.  
  339. var R3VCA_ClipResult2D = 71531; // r3Vect[]
  340. var R3VCA_ClipResult3D = 71532; // r3Vect[]
  341. R3VCA_PrivateHotp = 71533;
  342. function SetR3VCA_PrivateHotp(value) {
  343.   R3Set(this.r3obj, R3VCA_PrivateHotp, value, R3TID_INTEGER, 0); 
  344. }
  345.  
  346. function GetR3VCA_PrivateHotp() {
  347.   return R3Get(this.r3obj, R3VCA_PrivateHotp, R3TID_INTEGER, 0); 
  348. }
  349.  
  350. R3VCA_NoVertPersp = 71534;
  351. function SetR3VCA_NoVertPersp(value) {
  352.   R3Set(this.r3obj, R3VCA_NoVertPersp, value, R3TID_INTEGER, 0); 
  353. }
  354.  
  355. function GetR3VCA_NoVertPersp() {
  356.   return R3Get(this.r3obj, R3VCA_NoVertPersp, R3TID_INTEGER, 0); 
  357. }
  358.  
  359. var R3VC_PERSPECTIVE = 0;
  360. var R3VC_ORTHOGRAPHIC = 1;
  361. var R3VC_TOIPLANE = 0;
  362. var R3VC_TOIPLANEX = 1;
  363. var R3VC_TOIPLANEY = 2;
  364. var R3VC_TOIPLANEZ = 3;
  365. var R3VC_TOCAMERAPLANE = 4;
  366. var R3VC_TOCUSTOMPLANE = 5;
  367. var R3VC_TOAXIS = 6;
  368.  
  369.  
  370. function r3Vcam () { 
  371.    this.base = r3God;
  372.    if(arguments.length) {
  373.       this.base(R3CLID_VCAM, arguments);
  374.    }
  375.    // Methods
  376.    this.SETNATIVEORIENTATION=mR3VCM_SETNATIVEORIENTATION;
  377.    this.GOTONATIVEORIENTATION=mR3VCM_GOTONATIVEORIENTATION;
  378.    this.ROTATE=mR3VCM_ROTATE;
  379.    this.SETALLHOTPOINTS=mR3VCCM_SETALLHOTPOINTS;
  380.    this.DO2DTODIRPOINT=mR3VCM_DO2DTODIRPOINT;
  381.    this.DO3DTO2DANDSIGN=mR3VCM_DO3DTO2DANDSIGN;
  382.    this.CLIPLINE=mR3VCM_CLIPLINE;
  383.    this.DO2DFLOATTO3D=mR3VCM_DO2DFLOATTO3D;
  384.    this.ROTATETOMAIN=mR3VCM_ROTATETOMAIN;
  385.    this.CLIPFARLINE=mR3VCM_CLIPFARLINE;
  386.    this.CLIPLINEGENERAL=mR3VCM_CLIPLINEGENERAL;
  387.  
  388.    // Attributes
  389.    this.GetProjection=GetR3VCA_Projection;
  390.    this.SetProjection=SetR3VCA_Projection;
  391.    this.GetWidth=GetR3VCA_Width;
  392.    this.SetWidth=SetR3VCA_Width;
  393.    this.GetHeight=GetR3VCA_Height;
  394.    this.SetHeight=SetR3VCA_Height;
  395.    this.GetAspectRatio=GetR3VCA_AspectRatio;
  396.    this.SetAspectRatio=SetR3VCA_AspectRatio;
  397.    this.GetPosition=GetR3VCA_Position;
  398.    this.SetPosition=SetR3VCA_Position;
  399.    this.GetAimpoint=GetR3VCA_Aimpoint;
  400.    this.SetAimpoint=SetR3VCA_Aimpoint;
  401.    this.GetHeading=GetR3VCA_Heading;
  402.    this.SetHeading=SetR3VCA_Heading;
  403.    this.GetPitching=GetR3VCA_Pitching;
  404.    this.SetPitching=SetR3VCA_Pitching;
  405.    this.GetBanking=GetR3VCA_Banking;
  406.    this.SetBanking=SetR3VCA_Banking;
  407.    this.GetIPlaneHeading=GetR3VCA_IPlaneHeading;
  408.    this.SetIPlaneHeading=SetR3VCA_IPlaneHeading;
  409.    this.GetIPlanePitching=GetR3VCA_IPlanePitching;
  410.    this.SetIPlanePitching=SetR3VCA_IPlanePitching;
  411.    this.GetIPlaneBanking=GetR3VCA_IPlaneBanking;
  412.    this.SetIPlaneBanking=SetR3VCA_IPlaneBanking;
  413.    this.GetScale=GetR3VCA_Scale;
  414.    this.SetScale=SetR3VCA_Scale;
  415.    this.GetCoordSys=GetR3VCA_CoordSys;
  416.    this.SetCoordSys=SetR3VCA_CoordSys;
  417.    this.GetIPCoordSys=GetR3VCA_IPCoordSys;
  418.    this.SetIPCoordSys=SetR3VCA_IPCoordSys;
  419.    this.GetDistance=GetR3VCA_Distance;
  420.    this.SetDistance=SetR3VCA_Distance;
  421.    this.GetHotpoint=GetR3VCA_Hotpoint;
  422.    this.SetHotpoint=SetR3VCA_Hotpoint;
  423.    this.GetModelView=GetR3VCA_ModelView;
  424.    this.GetViewIPAngle=GetR3VCA_ViewIPAngle;
  425.    this.GetKeepIPlaneOrthogonal=GetR3VCA_KeepIPlaneOrthogonal;
  426.    this.SetKeepIPlaneOrthogonal=SetR3VCA_KeepIPlaneOrthogonal;
  427.    this.SetRelHeading=SetR3VCA_RelHeading;
  428.    this.SetRelIPlaneHeading=SetR3VCA_RelIPlaneHeading;
  429.    this.GetNativeCoordSys=GetR3VCA_NativeCoordSys;
  430.    this.SetNativeCoordSys=SetR3VCA_NativeCoordSys;
  431.    this.GetMinClipDist=GetR3VCA_MinClipDist;
  432.    this.SetMinClipDist=SetR3VCA_MinClipDist;
  433.    this.GetMaxClipDist=GetR3VCA_MaxClipDist;
  434.    this.SetMaxClipDist=SetR3VCA_MaxClipDist;
  435.    this.GetPrivateHotp=GetR3VCA_PrivateHotp;
  436.    this.SetPrivateHotp=SetR3VCA_PrivateHotp;
  437.    this.GetNoVertPersp=GetR3VCA_NoVertPersp;
  438.    this.SetNoVertPersp=SetR3VCA_NoVertPersp;
  439. }
  440.  
  441. r3Vcam.prototype=new r3Model;
  442. // r3vcam.h_H